The approaches described in this section are approaches that could be pursued, but not necessarily approaches that have been previously conceived or pursued. Therefore, unless otherwise indicated, it should not be assumed that any of the approaches described in this section qualify as prior art merely by virtue of their inclusion in this section.
The Extensible Markup Language (XML) is a standard for data and documents that has wide acceptance in the computer industry. Relational and object-relational database systems are configured to store and support query mechanisms for XML data. It is important for such database systems to be able to execute SQL queries that embed XML query languages, such as XQuery.
XQuery is a query language that is designed to query collections of XML data and is semantically similar to SQL. XQuery 1.0 was developed by the XML Query working group of the W3C. The work was closely coordinated with the development of XSLT 2.0 by the XSL Working Group; the two groups shared responsibility for XPath 2.0, which is a subset of XQuery 1.0. The specification that defines XQuery 1.0 became a W3C Recommendation on Jan. 23, 2007. This specification is available at http://www.w3.org/TR/xquery/ and is incorporated by reference as if fully set forth herein.
XQuery provides the means to extract and manipulate data from XML documents or any data source that can be viewed as XML, such as relational databases or office documents.
XQuery uses XPath expression syntax to address specific parts of an XML document and supplements XPath expression syntax with a SQL-like “FLWOR expression” for performing joins. A FLWOR expression is constructed from the five clauses after which the FLWOR expression is named: for, let, where, order by, return.
XQuery is based on a tree-structured model of the information content of an XML document, containing seven kinds of nodes: document nodes, elements, attributes, text nodes, comments, processing instructions, and namespaces.
XQuery's type system models all values as sequences (a singleton value is considered to be a sequence of length one). An item in a sequence can either be a node or an atomic value. Atomic values may be integers, strings, booleans, etc.